import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'flutter_video_info_method_channel.dart';

abstract class FlutterVideoInfoPlatform extends PlatformInterface {
  /// Constructs a FlutterVideoInfoPlatform.
  FlutterVideoInfoPlatform() : super(token: _token);

  static final Object _token = Object();

  static FlutterVideoInfoPlatform _instance = MethodChannelFlutterVideoInfo();

  /// The default instance of [FlutterVideoInfoPlatform] to use.
  ///
  /// Defaults to [MethodChannelFlutterVideoInfo].
  static FlutterVideoInfoPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [FlutterVideoInfoPlatform] when
  /// they register themselves.
  static set instance(FlutterVideoInfoPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  /// 获取视频编码格式
  Future<String?> getVideoCodec(String videoPath);

  /// 视频压缩
  Future<String?> compressVideo(String videoPath);

  /// 获取进度
  Stream<double> get progressStream;

  /// 取消压缩
  Future<void> cancelCompressing();
}
